﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CourseList.aspx.cs" Inherits="Presentation.CourseList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<fieldset class="bold" id="search criteria">

    <legend>Search Criteria</legend>

        <asp:Table ID="Condition" runat="server" Height="106px" Width="744px">
            <asp:TableRow runat="server" HorizontalAlign="Right">
                <asp:TableCell runat="server" ><asp:Label runat="server" ID="Lable1" Text="Course Name"></asp:Label></asp:TableCell>
                <asp:TableCell runat="server" ><asp:TextBox ID="CourseName" Width="150px" runat="server"></asp:TextBox></asp:TableCell>
                <asp:TableCell runat="server" ><asp:Label ID="Label2" runat="server" Text="   Course Status"></asp:Label></asp:TableCell>
                <asp:TableCell runat="server">
                <asp:RadioButton ID="StatusOpen" runat="server" Text="Open   "  GroupName="Status" />
                <asp:RadioButton ID="StatusClose" runat="server" Text="  Close"  GroupName="Status"/>
               </asp:TableCell>
            </asp:TableRow>
            <asp:TableRow runat="server" HorizontalAlign="Right">
                <asp:TableCell runat="server"><asp:Label runat="server" Text="Teacher Name" ID="Lable3"></asp:Label></asp:TableCell>
                <asp:TableCell runat="server">
                <asp:DropDownList runat="server" ID="TeacherName" Width="155px">
                     
                </asp:DropDownList></asp:TableCell>
                <asp:TableCell runat="server"><asp:Label runat="server" ID="Label4" Text="Course Level"></asp:Label></asp:TableCell>
                <asp:TableCell runat="server">
                <asp:DropDownList runat="server" ID="CourseLevel" Width="150px">
                    
                </asp:DropDownList></asp:TableCell>
                <asp:TableCell runat="server"><asp:Button runat="server" ID="Generate" Text="Generate Report"   OnClick="SearchBtnClick"></asp:Button>
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table> 
      
 </fieldset>
 <fieldset class="bold" id="result">
    <legend>Report</legend>
    <asp:Label ID="errMsg" Text="Sorry, no records are found. T_T" runat="server" Visible="false" ></asp:Label>
     <asp:GridView ID="CourseListView" runat="server" AutoGenerateColumns="False" AllowPaging="True"
        PagerSettings-Mode="NextPreviousFirstLast" PageSize="8"  
         AllowSorting="true" OnSorting="CourseList_Sorting"
         OnPageIndexChanging="CourseListView_PageIndexChanging" CellPadding="4" 
         ForeColor="#333333" GridLines="None" 
         onselectedindexchanged="CourseListView_SelectedIndexChanged">
         <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
         <Columns>
             <asp:BoundField HeaderText="CourseId" DataField="CourseId" ReadOnly="True" Visible="true" SortExpression="CourseId"/>
             <asp:BoundField HeaderText="Course Name" DataField="CourseName" ReadOnly="True" Visible="true" SortExpression="CourseName"/>
             <asp:BoundField HeaderText="Course Status" DataField="CourseStatus" ReadOnly="True" Visible="true"　/>
             <asp:BoundField HeaderText="Teacher Name" DataField="TeacherName" ReadOnly="True" Visible="true" SortExpression="TeacherName" />
             <asp:BoundField HeaderText="Course Level" DataField="LevelName" ReadOnly="True" Visible="true"  SortExpression="LevelName"/>
             <asp:BoundField HeaderText="Student Number" DataField="StudentNumber" ReadOnly="True" Visible="true" SortExpression="StudentNumber" />
         </Columns>
         <EditRowStyle BackColor="#999999" />
         <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
         <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
         <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
         <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
         <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
         <SortedAscendingCellStyle BackColor="#E9E7E2" />
         <SortedAscendingHeaderStyle BackColor="#506C8C" />
         <SortedDescendingCellStyle BackColor="#FFFDF8" />
         <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
     </asp:GridView>
     
 </fieldset>
</asp:Content>
